import React from 'react';
import { List } from 'antd';
import './index.less';
import InfoCard from './infoCard';
import { infos } from './mockData';
import { Dynamicdata } from './mockData';
interface InfomationProps {}

const Infomation: React.FC<InfomationProps> = () => {
  return (
    <div className="full-page infomation-page">
      <div className="page-left">
        {infos.map((item, idx) => (
          <InfoCard key={idx} info={item} />
        ))}
      </div>
      <div className="page-right">
        <List
          header={<div className="list-title">热门资讯</div>}
          itemLayout="horizontal"
          dataSource={Dynamicdata}
          split={false}
          renderItem={(item, idx) => (
            <List.Item>
              <div className="list-item">
                <span className="list-index"> {idx + 1}</span>
                <span className="list-text"> {item.title}</span>
              </div>
            </List.Item>
          )}
        />
      </div>
    </div>
  );
};

export default Infomation;
